<template>
<div class="tabbar">
    <div :id="{active:index==light}" @click="highlight(index)" v-for="(item,index) in arr" :key="index">{{item}}
    </div>
</div>
</template>

<script>
export default {
    data() {
        return {
            light: 0,
            arr: ['首页', '爆爆团', '订单','我的']
        }
    },
    methods: {

        highlight(index) {
            return this.light = index;
        }
    }
}
</script>

<style lang="scss" scoped>
.tabbar {
    display: flex;
    justify-content: space-evenly;
    position: fixed;
    bottom: 0;
    border-top: 1px solid black;
    width: 100%;
    height: 40px;
}

.tabbar div {
    line-height: 40px;
}

.active {
    color: aqua;
}
</style>